package com.tdkj.action.front.entrance;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.tdkj.action.BaseAction;
import com.tdkj.model.common.BeanType;
import com.tdkj.model.friendlylink.BeanFriendlylink;
import com.tdkj.model.information.BeanBaseInfo;
import com.tdkj.model.information.BeanExpert;
import com.tdkj.model.selfadvert.BeanSelfAdvert;
import com.tdkj.model.shop.BeanGood;
import com.tdkj.model.website.BeanWebsiteNotice;
import com.tdkj.model.yellowpage.BeanEnterprice;
import com.tdkj.service.home.IBeanHomePageService;

public class MainAction extends BaseAction {
	private IBeanHomePageService homePageService;
	private Map<String,List<BeanBaseInfo>> productPrices=new HashMap<String, List<BeanBaseInfo>>();//企业报价 
	private List<BeanEnterprice> enterprices=new ArrayList<BeanEnterprice>();//黄页信息
	private List<BeanBaseInfo> trades=new ArrayList<BeanBaseInfo>();//供应信息
	private Map<String,List<BeanBaseInfo>> miningrights=new HashMap<String, List<BeanBaseInfo>>();//矿权信息
	private List<BeanBaseInfo> prospects=new ArrayList<BeanBaseInfo>();//勘察开采
	private List<BeanBaseInfo> invests=new ArrayList<BeanBaseInfo>();//投资
	private List<BeanBaseInfo> mineKnowledges=new ArrayList<BeanBaseInfo>();//矿业知识
	private List<BeanBaseInfo> policys=new ArrayList<BeanBaseInfo>();//政策
	private List<BeanBaseInfo> merchants=new ArrayList<BeanBaseInfo>();//招商
	private List<BeanBaseInfo> harbors=new ArrayList<BeanBaseInfo>();//招商
	private List<BeanBaseInfo> quotationGuides=new ArrayList<BeanBaseInfo>();//行情指导
	private List<BeanExpert> experts=new ArrayList<BeanExpert>();//专家
	private Map<String,List<BeanBaseInfo>> recruits=new HashMap<String, List<BeanBaseInfo>>();//招聘信息
	private List<BeanFriendlylink> friendlinks=new ArrayList<BeanFriendlylink>();//友情链接
	private List<BeanSelfAdvert> selfAdverts=new ArrayList<BeanSelfAdvert>();
	private List<BeanGood> recommendtionGoods=new ArrayList<BeanGood>();//获取商品推荐
	private List<BeanType> goodTypes=new ArrayList<BeanType>();//获取商品分类
	private List<BeanGood>	goods=new ArrayList<BeanGood>();//获取商品
 	private List<BeanWebsiteNotice> notices=new ArrayList<BeanWebsiteNotice>();//后去网站公告
	public IBeanHomePageService getHomePageService() {
		return homePageService;
	}
	@Resource
	public void setHomePageService(IBeanHomePageService homePageService) {
		this.homePageService = homePageService;
	}
	public List<BeanSelfAdvert> getSelfAdverts() {
		return selfAdverts;
	}
	public void setSelfAdverts(List<BeanSelfAdvert> selfAdverts) {
		this.selfAdverts = selfAdverts;
	}
	public List<BeanType> getGoodTypes() {
		return goodTypes;
	}
	public void setGoodTypes(List<BeanType> goodTypes) {
		this.goodTypes = goodTypes;
	}
	public List<BeanGood> getGoods() {
		return goods;
	}
	public void setGoods(List<BeanGood> goods) {
		this.goods = goods;
	}
	public List<BeanGood> getRecommendtionGoods() {
		return recommendtionGoods;
	}
	public void setRecommendtionGoods(List<BeanGood> recommendtionGoods) {
		this.recommendtionGoods = recommendtionGoods;
	}
	public Map<String, List<BeanBaseInfo>> getProductPrices() {
		return productPrices;
	}
	public void setProductPrices(Map<String, List<BeanBaseInfo>> productPrices) {
		this.productPrices = productPrices;
	}
	public List<BeanEnterprice> getEnterprices() {
		return enterprices;
	}
	public void setEnterprices(List<BeanEnterprice> enterprices) {
		this.enterprices = enterprices;
	}
	public List<BeanBaseInfo> getTrades() {
		return trades;
	}
	public void setTrades(List<BeanBaseInfo> trades) {
		this.trades = trades;
	}
	public Map<String, List<BeanBaseInfo>> getMiningrights() {
		return miningrights;
	}
	public void setMiningrights(Map<String, List<BeanBaseInfo>> miningrights) {
		this.miningrights = miningrights;
	}
	public List<BeanBaseInfo> getProspects() {
		return prospects;
	}
	public void setProspects(List<BeanBaseInfo> prospects) {
		this.prospects = prospects;
	}
	public List<BeanBaseInfo> getInvests() {
		return invests;
	}
	public void setInvests(List<BeanBaseInfo> invests) {
		this.invests = invests;
	}
	public List<BeanBaseInfo> getQuotationGuides() {
		return quotationGuides;
	}
	public void setQuotationGuidess(List<BeanBaseInfo> quotationGuides) {
		this.quotationGuides = quotationGuides;
	}
	public List<BeanBaseInfo> getMineKnowledges() {
		return mineKnowledges;
	}
	public void setMineKnowledges(List<BeanBaseInfo> mineKnowledges) {
		this.mineKnowledges = mineKnowledges;
	}
	public List<BeanBaseInfo> getPolicys() {
		return policys;
	}
	public void setPolicys(List<BeanBaseInfo> policys) {
		this.policys = policys;
	}
	public List<BeanBaseInfo> getMerchants() {
		return merchants;
	}
	public void setMerchants(List<BeanBaseInfo> merchants) {
		this.merchants = merchants;
	}
	public List<BeanWebsiteNotice> getNotices() {
		return notices;
	}
	public void setNotices(List<BeanWebsiteNotice> notices) {
		this.notices = notices;
	}
	public void setQuotationGuides(List<BeanBaseInfo> quotationGuides) {
		this.quotationGuides = quotationGuides;
	}
	public List<BeanBaseInfo> getHarbors() {
		return harbors;
	}
	public void setHarbors(List<BeanBaseInfo> harbors) {
		this.harbors = harbors;
	}
	public List<BeanExpert> getExperts() {
		return experts;
	}
	public void setExperts(List<BeanExpert> experts) {
		this.experts = experts;
	}
	public Map<String, List<BeanBaseInfo>> getRecruits() {
		return recruits;
	}
	public void setRecruits(Map<String, List<BeanBaseInfo>> recruits) {
		this.recruits = recruits;
	}
	public List<BeanFriendlylink> getFriendlinks() {
		return friendlinks;
	}
	public void setFriendlinks(List<BeanFriendlylink> friendlinks) {
		this.friendlinks = friendlinks;
	}
	public String execute() throws Exception {
		 findData();
	     return SUCCESS;
	}
	public void findData() {
		findProductPrices();
		findTrades();
		findEnterprices();
		findMiningrights();
		findInvests();
		findMerchants();
		findPolicys();
		findHarbors();
		findKonwledges();
		findExperts();
		findProspects();
		findFriendlinks();//获取友情链接
		findWebsiteNotices();
		findQuotationGuides();
		findRecruits();//获取招聘信息
		findSelfAdverts();//自助广告
		findRecommendtionGoods();//获取商品推荐
		findGoods();//获取商品
		findGoodTypes();//获取商品分类
	}
	
	private void findGoodTypes() {
		// TODO Auto-generated method stub
		goodTypes=homePageService.findGoodTypes();
	}
	private void findGoods() {
		// TODO Auto-generated method stub
		goods=homePageService.findGoods();
	}
	private void findRecommendtionGoods() {
		// TODO Auto-generated method stub
		recommendtionGoods=homePageService.findRecommendtionGoods();
		System.out.println(recommendtionGoods);
	}
	private void findSelfAdverts() {
		// TODO Auto-generated method stub
		selfAdverts=homePageService.findSelfAdverts();
	}
	private void findRecruits() {
		// TODO Auto-generated method stub
		recruits=homePageService.findRecruits();
	}
	private void findQuotationGuides() {
		// TODO Auto-generated method stub
		quotationGuides=homePageService.findQuotationGuides();
	}
	private void findWebsiteNotices() {
		// TODO Auto-generated method stub
		notices=homePageService.findWebsiteNotices();
	}
	private void findFriendlinks() {
		// TODO Auto-generated method stub
		friendlinks=homePageService.findFriendlinks();
		System.out.println(friendlinks.toString());
	}
	//获取企业报价
	private void findEnterprices() {
		enterprices=homePageService.findEnterprices();
	}
	
	//获取企业报价
	private void findProductPrices() {
		productPrices=homePageService.findProductPrices();
	}
	//获取供求信息
	private void findTrades() {
		trades=homePageService.findTrades();
	}
	//获取矿权信息
	private void findMiningrights(){
		miningrights=homePageService.findMiningrights();
	}
	//获取投资信息
	private void findInvests(){
		invests=homePageService.findInvests();
	}
	//获取招商信息
	private void findMerchants(){
		merchants=homePageService.findMerchants();
	}
	//获取政策信息
	private void findPolicys(){
		policys=homePageService.findPolicys();
	}
	//获取港口动态信息
	private void findHarbors(){
		harbors=homePageService.findHarbors();
	}
	//获取港口动态信息
	private void findKonwledges(){
		mineKnowledges=homePageService.findMineKnowledges();
	}
	//获取专家信息
	private void findExperts(){
		experts=homePageService.findExperts();
	}
	//获取勘察开采信息
	private void findProspects(){
		prospects=homePageService.findProspects();
	}
	
}
